package com.qf.controller;

import com.qf.service.TicketService;
import com.qf.utils.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

//后台管理
@RestController
@RequestMapping("/adminticket")
public class AdminTicketController {

    @Autowired
    TicketService ticketService;

    //后台查询所有订单
    @GetMapping("/findAll")
    public ResultMsg findAll(@RequestParam(required = false,defaultValue = "1")int page, @RequestParam(required = false,defaultValue = "5")int limit){
        return ticketService.findAll(page,limit);
    }
}
